using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using PccCommonForC;

public partial class Manager_Signature_UserSignImages : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["AdminUserID"] == null)
        {
            Response.Write("<script language=javascript>alert('Time is out.');window.open('../Default.aspx','_top');</script>");
            return;
        }
        if (Session["AdminUserID"] == null)
            return;

        clsWebShop cls = new clsWebShop();
        PccMsg msg = new PccMsg();
        msg.CreateFirstNode("UserID", Session["AdminUserID"].ToString());

        DataSet myds = cls.Get_shr_UserSignByCondition(msg.GetXmlStr);
        DataTable ImageTable = myds.Tables[0];
        byte[] byteReturn = { };
        //Bitmap newBitmap = null;
        if (ImageTable.Rows.Count > 0)
        {
            //newBitmap = new Bitmap(100,100,PixelFormat.Format32bppArgb); 
            byteReturn = (byte[])ImageTable.Rows[0]["sign_pic"];
            Response.BinaryWrite(byteReturn);
            //Response.ContentType = "Image/jpeg"; 
            //newBitmap.Save(Response.BinaryWrite(byteReturn), ImageFormat.Jpeg); 
        }
    }
}
